import { CanActivate, ExecutionContext, Inject } from "@nestjs/common";
import { Reflector } from "@nestjs/core";
import { Observable } from "rxjs";

export class TestGuard implements CanActivate {
    @Inject(Reflector)
    private reflector: Reflector

    canActivate(context: ExecutionContext): boolean | Promise<boolean> | Observable<boolean> {
        console.log(this.reflector.get('abin', context.getHandler()))
        console.log(this.reflector.get('abin', context.getClass()))
        return true
    }

}